#ifndef __COMMON__GRAYEXT_SCRIPT_INTERFACE_H__
#define __COMMON__GRAYEXT_SCRIPT_INTERFACE_H__

class WindbgExt;

namespace script_extension
{

//////////////////////////////////////////////////////////////////////////
// Script extension architecture
//////////////////////////////////////////////////////////////////////////
// /--------------------------------------\
// | WinDbg Script Extension: se.dll      |
// \--------------------------------------/
//                          || SetWindbgInterface
//                          || RunScript
//                          ||
//            /========\    ||
//           ||        ||   ||
//           \/        ||   ||
// /-----------------\ ||   ||
// | Script Engine   | ||   ||
// \-----------------/ ||   ||
//           ||        ||   ||
//           \/        ||   \/
// /-------------------------------\
// | Script Extension: windbg.dll  |
// \-------------------------------/


//////////////////////////////////////////////////////////////////////////
// Script extension module

// This function is provided by script extension module.
// It is used to set WinDbg extension interface pointer to use it in calls.
// Returns: 0 - OK, any other value - error
typedef int (__cdecl *FntypeSetWindbgInterface)(WindbgExt* iface);

// This function is exported by script extension module to execute script
// Returns: 0 - OK, any other value - error
typedef int (__cdecl *FntypeRunScript)(const char** params);

#define SCRIPTEXT_PERL_EXTENSION_NAME L"..\\site\\lib\\auto\\windbg\\windbg.dll"

#define SCRIPTEXT_SETWINDBGINTERFACE_FN "SetWindbgInterface" // FntypeSetWindbgInterface
#define SCRIPTEXT_RUNSCRIPT_FN "RunScript"	// FntypeRunScript

// Perl
#define SCRIPTEXT_PERL_SETWINDBGINTERFACE_FN "XS_windbg_SetWindbgInterface" // FntypeSetWindbgInterface
#define SCRIPTEXT_PERL_RUNSCRIPT_FN "XS_windbg_RunScript"	// FntypeRunScript


} // namespace script_extension

#endif // __COMMON__GRAYEXT_SCRIPT_INTERFACE_H__
